package meconsea.life.note.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import meconsea.life.sys.entity.AbsEntity;

import org.hibernate.annotations.Type;

@Entity
@Table(name = "NOTE_INFO")
@NamedQueries( { 
	@NamedQuery(name = NoteInfo.NOTE_INFO_FIND_ALL, query = "SELECT O FROM NoteInfo O order by O.createdAt"),
	@NamedQuery(name = NoteInfo.NOTE_INFO_FIND_BYUSER,query = "SELECT O FROM NoteInfo O where O.userId = :userId order by O.createdAt"),
	@NamedQuery(name = NoteInfo.NOTE_INFO_FIND_COMMEND,query="SELECT O FROM NoteInfo O where O.isCommend=:isCommend order by O.createdAt")
})
public class NoteInfo extends AbsEntity {
	
	public final static String NOTE_INFO_FIND_BYUSER = "note_info_find_user";
	public final static String NOTE_INFO_FIND_ALL = "note_info_find_all";
	public final static String NOTE_INFO_FIND_COMMEND = "note_info_find_commend";
	@Column(name = "userid", length = 64)
	private String userId;

	@Column(name = "notename", length = 512)
	private String noteName;

	@Column(name = "notedis", length = 1024)
	private String noteDis;

	@Column(name = "notelogo", length = 128)
	private String noteLogo;

	@Column(name = "noteftl", length = 128)
	private String noteFtl;

	@Column(name = "noteSum")
	@Type(type = "integer")
	private Integer noteSum = 0;

	@Column(name = "publicSum")
	@Type(type = "integer")
	private Integer publicSum = 0;

	@Column(name = "accessList", length = 1024)
	private String accessList;
	
	@Column(name="isCommend")
	@Type(type="integer")
	private Integer isCommend;

	public Integer getIsCommend() {
		return isCommend;
	}

	public void setIsCommend(Integer isCommend) {
		this.isCommend = isCommend;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getNoteName() {
		return noteName;
	}

	public void setNoteName(String noteName) {
		this.noteName = noteName;
	}

	public String getNoteDis() {
		return noteDis;
	}

	public void setNoteDis(String noteDis) {
		this.noteDis = noteDis;
	}

	public String getNoteLogo() {
		return noteLogo;
	}

	public void setNoteLogo(String noteLogo) {
		this.noteLogo = noteLogo;
	}

	public String getNoteFtl() {
		return noteFtl;
	}

	public void setNoteFtl(String noteFtl) {
		this.noteFtl = noteFtl;
	}

	public Integer getNoteSum() {
		return noteSum;
	}

	public void setNoteSum(Integer noteSum) {
		this.noteSum = noteSum;
	}

	public Integer getPublicSum() {
		return publicSum;
	}

	public void setPublicSum(Integer publicSum) {
		this.publicSum = publicSum;
	}

	public String getAccessList() {
		return accessList;
	}

	public void setAccessList(String accessList) {
		this.accessList = accessList;
	}

}
